package com.itheima.accountingdb.service;

import com.itheima.accountingdb.pojo.Category;
import com.itheima.accountingdb.pojo.PageBean;

/**
 * @author panweiwei
 */
public interface CategoryService {
    /**
     * 添加分类
     *
     * @param category
     * @return
     */
    Category add(Category category);

    /**
     * 更新分类
     *
     * @param id
     * @param category
     * @return
     */
    int update(long id, String name , String type);


    /**
     * 删除分类
     * @param id
     * @return
     */
    int delete(Long id);


    /**
     * 查询分类
     * @param page
     * @param size
     * @param name
     * @param type
     * @param isDeleted
     * @return
     */
    PageBean<Category> list(Integer page, Integer size, String name, String type, Long isDeleted,Long userId);
}
